package com.framework.Module.jxc.jxcgoodn;

import com.framework.Table.Table;
import com.framerock.baselib.Rock;


public class Tablejxcgoodn extends Table {

    protected void initTable() {
        this.tablename   = "jxcgoodn";
        this.tablenamesm = "子表商品列表";

        this.flowsetMap  = Rock.getMap(new String[]{
                "type", "进销存",
                "sort", "54",
                "isxt", "2",
                "summary", "{sname}:{count}{sunit}",
                "imgurl","https://xinhu-1251238447.file.myqcloud.com/img/project.png",
                "istj","1"
        });

        this.addfields("mid", "int(11)", "0", "主ID@@关联主jxcgoodm.id", new String[]{
                "fieldstype","hidden",
                "islb","0",
                "iszs","0"
        });

        this.addfields("sname", "varchar(200)", "", "商品@spdata,sid", new String[]{
                "isbt","1",
                "fieldstype","selectdatafalse"
        });
        this.addfields("sid", "int(11)", "0", "对应商品", new String[]{
                "notelement","1"
        });
        this.addfields("count", "decimal(10,2)", "0.00", "数量", new String[]{
                "islb","1"
        });
        this.addfields("sunit", "varchar(20)", "", "单位", new String[]{
                "islb","1"
        });
        this.addfields("price", "decimal(10,2)", "0.00", "单价", new String[]{

        });
        this.addfields("remark", "varchar(500)", "", "说明", new String[]{
                "isalign","1",
                "fieldstype","textarea"
        });
        this.addfields("cid", "int(11)", "0", "对应单位", new String[]{
                "islu","0",
                "notelement","1"
        });
        this.addfields("aid", "int(11)", "0", "对应人ID", new String[]{
                "islu","0",
                "islb","0",
                "iszs","0"
        });
        this.addfields("sort", "int(11)", "0", "排序号", new String[]{
                "ispx","1",
                "iseditlx","2",
                "iszs","0"
        });
        this.addfields("sfile", "varchar(100)", "", "相关文件", new String[]{
                "islb","1",
                "fieldstype","uploadfile"
        });
        this.addfields("cid", "KEY", "`cid`", "单位ID");
        this.addfields("mid", "KEY", "`mid`", "关联主表");

        this.addWhere("我添加的", "my", "`aid`={aid}");
    }

}
